- /* sroequal.cpp by K.Tsuru */
- // function ID = 8003 BRADIX
- /*********************
- SRational class
- relational operator==
- *********************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- int operator==(const SRational& m, const SRational& n){
- if(m.Sign(7003) != n.Sign(7003)) return 0;
- if(m.ReduceDone() && n.ReduceDone()){ //Both are irreducible fractions.
- SLong t;
- if(LLCompare(m.NumNR(), n.NumNR())) return 0; //numerator is diffrent
- if(LLCompare(m.DenNR(), n.DenNR())) return 0; //denominator is different
- return 1;
- }
- if( RRCompare(m, n) ) return 0;
- return 1;
- }
sroequal.cpp : last modifiled at 2015/12/03 21:23:22(596 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).